From 2f6b43b5622713e0906275bfd067eec1cb98413b Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 3 Mar 2006 14:10:35 +0100 Subject: [PATCH] Clean up PIT-thru-ioapic setup. We don't need the legacy missed-tick logic and so do not need to keep the PIT enabled thru the 8259 PIC. Todo: arguable we should sync with x86/64 platform files, assuming they do not throw out 'recent legacy' stuff (e.g., 32-bit only platforms like P6). Getting rid of all the 82489DX and 486-era SMP stuff would be great. Signed-off-by: Keir Fraser --- xen/arch/x86/io_apic.c | 7 ++++--- xen/arch/x86/time.c | 11 ----------- xen/include/asm-x86/time.h | 2 -- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 46e5c0c9f8..aef5d64b5a 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1548,8 +1548,9 @@ static inline void check_timer(void) */ apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); init_8259A(1); - timer_ack = 1; - enable_8259A_irq(0); + /* XEN: Ripped out the legacy missed-tick logic, so below is not needed. */ + /*timer_ack = 1;*/ + /*enable_8259A_irq(0);*/ pin1 = find_isa_irq_pin(0, mp_INT); apic1 = find_isa_irq_apic(0, mp_INT); @@ -1617,7 +1618,7 @@ static inline void check_timer(void) printk(KERN_INFO "...trying to set up timer as ExtINT IRQ..."); - timer_ack = 0; + /*timer_ack = 0;*/ init_8259A(0); make_8259A_irq(0); apic_write_around(APIC_LVT0, APIC_DM_EXTINT); diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 1bd15c6702..59fa0bfe04 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -41,7 +41,6 @@ boolean_param("hpet_force", opt_hpet_force); unsigned long cpu_khz; /* CPU clock frequency in kHz. */ unsigned long hpet_address; spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; -int timer_ack = 0; unsigned long volatile jiffies; static u32 wc_sec, wc_nsec; /* UTC time at last 'time update'. */ static spinlock_t wc_lock = SPIN_LOCK_UNLOCKED; @@ -148,16 +147,6 @@ void timer_interrupt(int irq, void *dev_id, struct cpu_user_regs *regs) { ASSERT(local_irq_is_enabled()); - if ( timer_ack ) - { - extern spinlock_t i8259A_lock; - spin_lock_irq(&i8259A_lock); - outb(0x0c, 0x20); - /* Ack the IRQ; AEOI will end it automatically. */ - inb(0x20); - spin_unlock_irq(&i8259A_lock); - } - /* Update jiffies counter. */ (*(unsigned long *)&jiffies)++; diff --git a/xen/include/asm-x86/time.h b/xen/include/asm-x86/time.h index b192f55c82..38e4dffcf2 100644 --- a/xen/include/asm-x86/time.h +++ b/xen/include/asm-x86/time.h @@ -4,8 +4,6 @@ #include -extern int timer_ack; - extern void calibrate_tsc_bp(void); extern void calibrate_tsc_ap(void); -- 2.30.2